<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main class="container mt-5">
    <h3 class="mb-4"><?php $this->archiveTitle([
        'category' => _t('%s'),
        'search'   => _t('包含关键字 %s 的文章'),
        'tag'      => _t('标签 %s 下的文章'),
        'author'   => _t('%s 发布的文章')
    ], '', ''); ?></h3>
    <ul class="list-group">
    <?php if ($this->have()): ?>
        <?php while ($this->next()): ?>
            <li class="custom-post-item d-flex justify-content-between align-items-center">
                <a href="<?php $this->permalink() ?>" class="post-title text-decoration-none">
                    <span class="title-text"><?php $this->title() ?></span>
                </a>
                <div class="post-meta">
                    
                <span class="post-meta-item">
    <i class="bi bi-person-fill me-1 text-primary"></i>
    <a href="<?php $this->author->permalink(); ?>" class="author-link text-decoration-none">
        <?php $this->author(); ?>
    </a>
    
    <span class="meta-separator mx-2 text-muted">/</span>
    
    <i class="bi bi-calendar3 me-1 text-success"></i>
    <time datetime="<?php $this->date('c'); ?>"><?php $this->date('Y-m-d'); ?></time>
</span>
                </div>
            </li>
        <?php endwhile; ?>
    <?php else: ?>
        <li class="list-group-item">没有找到内容</li>
    <?php endif; ?>
</ul>

    <?php if ( $this->is('archive') || $this->is('index') ) { ?>
    <nav aria-label="Page navigation" class="mt-4">
        <ul class="pagination justify-content-center">
            <?php $this->pageNav('&laquo;', '&raquo;', 1, '...'); ?>
        </ul>
    </nav>
    <?php }; ?>
</main>
<?php $this->need('footer.php'); ?>